@extends('layouts.comment')
@section('css')
<style>
    td{
        text-align: center;
    }
</style>
@endsection
@section('content')
<div id="dcMain">
    <div id="urHere">租伴 管理中心 > 消费/收入</div>
    <div id="index" class="mainBox" style="padding-top:18px;height:auto!important;height:550px;min-height:550px;">
        <div class="indexBox">
            <div class="boxTitle">消费/收入</div>
            <div style="margin-top: 15px;margin-bottom: 15px">
                <form action="consum.html" method="get">
                    昵称/租号：<input name="nickname" type="text" class="inpMain" value="@if(isset($nickname)){{$nickname}}@endif" size="20" />
                    时间段：<input type="text" id="start" name="time" class="inpMain" value="@if(isset($time)){{$time}}@endif" style="width: 15%">
                    <input  class="btnGray" type="submit" value="筛选" />
                </form>
            </div>
            <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
                <tr>
                    <td width="100" valign="top">序号</td>
                    <td width="120" valign="top">收入人 </td>
                    <td width="120" valign="top">消费人 </td>
                    <td width="250" valign="top">收入类型 </td>
                    <td width="150" valign="top">收入金额</td>
                    <td width="100" valign="top">收入时间 </td>
                </tr>
                @if(!empty($logs))
                @foreach($logs as $log)
                <tr>
                    <td valign="top">{{$log['id']}}</td>
                    <td valign="top" title="id:{{$log['uid']}}">{{$log['getname']}}</td>
                    <td valign="top" title="id:{{$log['fid']}}">{{$log['payname']}}</td>
                    <td valign="top">租伴</td>
                    <td valign="top">{{$log['price']}}租币</td>
                    <td valign="top">{{date('Y-m-d H:s:i',$log['create_time'])}}</td>
                </tr>
                @endforeach
                @endif
            </table>
            @if(!empty($total))
            <div class="pager">总计 {{$total}} 个记录，共 {{$pagenum}} 页，当前第 {{$cpage}} 页 | <a href="consum.html?page=1{{$url}}">第一页</a> <a href="consum.html?page={{$prev}}{{$url}}">上一页</a> <a href="consum.html?page={{$next}}{{$url}}">下一页</a> <a href="consum.html?page={{$pagenum}}{{$url}}">最末页</a></div>
            @endif
        </div>
    </div>
</div>
@endsection
@section('js')
<script type="text/javascript" src="{{asset('/js')}}/laydate.js"></script>
<script>
    //执行一个laydate实例
    laydate.render({
         elem: '#start' //指定元素
        ,type:'datetime'
        ,range:'~'
    });
</script>
</script>
@endsection